#ifndef _PT_DC_H_
#define _PT_DC_H_

#include <gal/font.h>
#include <gal/region.h>
#include <gal/color.h>

typedef struct ptgui_dc
{
	ptgui_rect_t	clip_rect;

	pt_uint8_t		draw_mode;
	pt_uint8_t		pen_size;
	pt_uint8_t		pen_shap;
	pt_uint8_t		line_style;
	pt_uint8_t		fill_style;

	pt_uint32_t		fg_color;
	pt_uint32_t		bg_color;

	pt_uint8_t		text_mode;
	/* text align */
	pt_uint32_t		text_align;

	/* font */
	ptgui_font_t	*font;

	ptgui_surface_t	*owner;

} ptgui_dc_t;

ptgui_dc_t *ptgui_dc_begin_drawing(ptgui_surface_t *owner);
void ptgui_dc_end_drawing(ptgui_dc_t *dc);

void ptgui_dc_destory(struct ptgui_dc *dc);

void ptgui_dc_draw_point(struct ptgui_dc *dc, pt_int16_t x, pt_int16_t y);
void ptgui_dc_draw_text(struct ptgui_dc *dc, const char *text, struct ptgui_rect *rect);

void ptgui_dc_set_fg_color(struct ptgui_dc *dc, ptgui_color_t color);
void ptgui_dc_set_fg_color_rgb(struct ptgui_dc *dc, pt_uint8_t r, pt_uint8_t g, pt_uint8_t b);
void ptgui_dc_set_bg_color(struct ptgui_dc *dc, ptgui_color_t color);
void ptgui_dc_set_bg_color_rgb(struct ptgui_dc *dc, ptgui_color_t color);
ptgui_color_t ptgui_dc_get_fg_color(struct ptgui_dc *dc);
ptgui_color_t ptgui_dc_get_bg_color(struct ptgui_dc *dc);

pt_bool_t ptgui_dc_get_visible(struct ptgui_dc *dc);

#endif